﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBA.Common;
using DBA.Model;
using DBA.Data;
using DBA.Data.ADO;
using DBA.Web.UI;

namespace DBA.Web.Teaching
{
    public partial class OtherWorkAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["id"] != null)
            {
                spanName.InnerHtml = Request.Params["name"];
                txt_EmployeeID.Value = Request.Params["id"];
            }
        }
        DataAccessLibrary dal = CommonQuery.DataAccessLibrary;

        protected void lnkSave_Click(object sender, EventArgs e)
        {
            OtherWork modelOtherWork = ConvertHelper.ControlToModel<OtherWork>(pan_tab.Controls);
            //studentInfo.EmployeeID = 10;
            hdResult.Value = dal.ModifyData.Insert<OtherWork>(modelOtherWork).ToString();
        }
    }
}